// Color definitions.
var Color = {};
Color.black = 0;
Color.darkRed = 1;
Color.darkGreen = 2;
Color.brown = 3;
Color.darkBlue = 4;
Color.purple = 5;
Color.teal = 6;
Color.gray = 7;
Color.grey = 7;
Color.darkGray = 8;
Color.darkGrey = 8;
Color.red = 9;
Color.green = 10;
Color.yellow = 11;
Color.blue = 12;
Color.magenta = 13;
Color.cyan = 14;
Color.white = 15;
// ASCII table of colors for blitString.
Color.asciiCodes =
{
	'0': Color.black,
	'1': Color.darkRed,
	'2': Color.darkGreen,
	'3': Color.brown,
	'4': Color.darkBlue,
	'5': Color.purple,
	'6': Color.teal,
	'7': Color.gray,
	'8': Color.darkGray,
	'9': Color.red,
	'a': Color.green,
	'b': Color.yellow,
	'c': Color.blue,
	'd': Color.magenta,
	'e': Color.cyan,
	'f': Color.white,
	'g': null,
	'A': Color.green,
	'B': Color.yellow,
	'C': Color.blue,
	'D': Color.magenta,
	'E': Color.cyan,
	'F': Color.white,
	'G': null
};
// Table of ASCII codes for color numbers
Color.codesByNumber =
{
	0: '0',
	1: '1',
	2: '2',
	3: '3',
	4: '4',
	5: '5',
	6: '6',
	7: '7',
	8: '8',
	9: '9',
	10: 'a',
	11: 'b',
	12: 'c',
	13: 'd',
	14: 'e',
	15: 'f'
}
